<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
 <link rel="stylesheet" href="../static/css/back/iconfont.css">
    <link rel="stylesheet" href="../static/css/back/xadmin.css">
    <script type="text/javascript" src="../static/js/jquery-2.1.1.min.js"></script>
    
    <script type="text/javascript" src="../static/js/back/xadmin.js"></script>
    <script type="text/javascript" src="../static/js/back/goods-type.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
   	<style type="text/css">
   	.addmendian{
   		float:right;
/*    		margin-right:30px; */
   	}
   	.shop-sup{
   		display: block;
	    text-align: center;
	    border: 1px solid;
	    border-radius: 5px;
	    margin: 5px 0;
   	}
   	.mei{
    	color: #f50;   	
   	}
   	.tang{
   		color: green; 
   	}
   	.icon-tuijian{
   	    color: cornflowerblue;
    	font-size: 32px;
   	}
   	.out-time{
   		    background: url(../static/images/back/outTime.png) no-repeat 41px -3px;
		    height: 40%;
		    background-size: 136px;
		    color: red;
		    background-position: center center;
   	}
   	</style>
  </head>
  
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="javascript:;">首页</a>
        <a href="javascript:;">商品管理</a>
        <a href="javascript:;"><cite>商品分类</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="iconfont icon-refresh right-top-ref" ></i></a>
    </div>
    <div class="x-body">
     <!--  <div class="layui-row">
        <form action="#" class="layui-form layui-col-md12 x-so" onsubmit="javascript:return false;">

          <input type="text" name="" id="ser-title"  placeholder="请输入门店名称" autocomplete="off" class="layui-input">
          <label for="username" class="layui-label">
                  <span class="x-red">*</span>服务时间
              </label>
               <div class="layui-input-inline">
		          <input class="layui-input" placeholder="开始日" name="start" id="startTime"> - 
		          <input class="layui-input" placeholder="截止日" name="end" id="endTime">
               </div>
          <label for="username" class="layui-label">
                  <span class="x-red">*</span>门店类型
              </label>
              <div class="layui-input-inline">
                  <select id="shopType" name="shopType" class="valid" lay-verify="">
                    <option value="">请选择</option>
                    <option value="1">美食</option>
                    <option value="2">超市</option>
                  </select>
              </div>
          <button class="layui-btn search-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i>查询</button>
          <button type="reset" class="layui-btn layui-btn-primary">重置</button>
          <button class="layui-btn addmendian"  onclick="parent.clickMenuOnChild('shop-add.html?type=add')"><i class="layui-icon"></i> 添加门店</button>
        </form>
<!--       </div> -->
      <xblock>
<!--         <button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button> -->
        <button class="layui-btn" onclick="x_admin_show('添加商品分类','./goods-type-add.html?type=add',451,300)"><i class="layui-icon"></i>添加</button>
         <button class="layui-btn  layui-btn-warm" id="uploadgoods"  ><i class="layui-icon"></i> 批量导入</button>
         <button class="layui-btn  layui-btn-primary"  onclick="downloadCityExcel()"><i class="layui-icon"></i> 下载模板</button>
         
        <span class="x-right" style="line-height:40px">共有数据：88 条</span>
      </xblock>
      <table class="layui-table">
        <thead>
          <tr>
<!--             <th> -->
<!--               <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div> -->
<!--             </th> -->
            <th>ID</th>
            <th>排序</th>
            <th>分类名称</th>
            <th>操作</th>
        </thead>
        <tbody>
          <tr>
<!--             <td> -->
<!--               <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div> -->
<!--             </td> -->
            <!-- <td>1</td>
            <td>admin</td>
            <td>超级管理员</td>
            <td>正常</td>
            <td>
              <a title="编辑"  onclick="x_admin_show('编辑','admin-edit.html')" href="javascript:;">
                <i class="layui-icon">&#xe642;</i>
              </a>
              <a onclick="member_stop(this,'要删除的id')" href="javascript:;"  title="封号">
                <i class="layui-icon">&#xe601;</i>
              </a>
              <a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">
                <i class="iconfont icon-delete x-red"></i>
              </a>
            </td>
          </tr> -->
        </tbody>
      </table>
       <div class="layui-form-mid layui-word-aux no-more-data hide">暂无更多数据</div>
      <div class="page mypage" ></div>

    </div>
    <script>
      layui.use(['laydate','upload'], function(){
        var laydate = layui.laydate, upload = layui.upload;
        
        //执行一个laydate实例
        laydate.render({
          elem: '#startTime' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
          elem: '#endTime' //指定元素
        });
        
        var pid = getCookie("shop_id");
        uploadListIns  =  upload.render({
            elem: '#uploadgoods'
            ,url: '../excel/importGoodsType/'
            ,accept: 'file' //普通文件
            ,auto: true
            ,exts: 'xls|xlsx' 
            ,multiple: false
            ,data:{shopId:pid}
	        ,before: function(obj){
	        	layer.load();
	        }
            ,done: function(res){
              console.log(res)
              if(res.resultCode == 1000){
	              layer.msg('导入成功',{icon:6,time:2000});
	              layer.closeAll('loading');
	              return;
              }else if(res.resultCode == 9999 ){
	              layer.alert(res.returnObject);
	              layer.closeAll('loading');
	              return;
              }
            }
          });
        
        
        
      });
      function downloadCityExcel(){
    		window.open('../excel/downGoodsTypeExcel.do');
    	} 
    </script>

  </body>

</html>